/**
 * @author 陈泰来
 * @version V1.0
 * @Project echo-java-base
 * @Title 纽约披萨店
 * @Description *
 * @Package designmodel.factorymodel2.ex2.factory
 * @date 2021/3/9 11:26 上午
 * @Copyright:学如逆水行舟，不进则退 .
 */
package designmodel.factorymodel2.ex2.factory;

import designmodel.factorymodel2.ex2.model.NYStyleChessePizza;
import designmodel.factorymodel2.ex2.model.NYStylePepperonPizza;
import designmodel.factorymodel2.ex2.model.Pizza;

public class NYPizzaStore extends PizzaStore {

    @Override
    Pizza createPizza(String type) {

        switch (type) {
            case "pepperon":
                return new NYStylePepperonPizza();
            case "cheese":
                return new NYStyleChessePizza();
            default:
                System.out.println("没有对应的披萨类型哦!");
                return null;
        }
    }
}
